home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / jigsaw / aboutbox.frm (.txt) next >
Encoding:
Visual Basic Form  |  1995-05-08  |  4.8 KB  |  147 lines

  1. VERSION 2.00
  2. Begin Form AboutBox 
  3.    BorderStyle     =   3  'Fixed Double
  4.    Caption         =   "About VB JigSaw"
  5.    ClientHeight    =   2250
  6.    ClientLeft      =   1365
  7.    ClientTop       =   1425
  8.    ClientWidth     =   5640
  9.    FontBold        =   -1  'True
  10.    FontItalic      =   0   'False
  11.    FontName        =   "System"
  12.    FontSize        =   9.75
  13.    FontStrikethru  =   0   'False
  14.    FontUnderline   =   0   'False
  15.    Height          =   2655
  16.    Icon            =   0
  17.    Left            =   1305
  18.    LinkMode        =   1  'Source
  19.    LinkTopic       =   "Form2"
  20.    MaxButton       =   0   'False
  21.    MinButton       =   0   'False
  22.    ScaleHeight     =   2250
  23.    ScaleWidth      =   5640
  24.    Top             =   1080
  25.    Width           =   5760
  26.    Begin CommandButton Cmd_OK 
  27.       Caption         =   "OK"
  28.       FontBold        =   -1  'True
  29.       FontItalic      =   0   'False
  30.       FontName        =   "System"
  31.       FontSize        =   9.75
  32.       FontStrikethru  =   0   'False
  33.       FontUnderline   =   0   'False
  34.       Height          =   360
  35.       Left            =   4350
  36.       TabIndex        =   0
  37.       Top             =   1695
  38.       Width           =   1035
  39.    End
  40.    Begin PictureBox Picture1 
  41.       Height          =   30
  42.       Left            =   990
  43.       ScaleHeight     =   0
  44.       ScaleWidth      =   4350
  45.       TabIndex        =   5
  46.       Top             =   1320
  47.       Width           =   4380
  48.    End
  49.    Begin PictureBox Pic_ApplicationIcon 
  50.       AutoSize        =   -1  'True
  51.       BorderStyle     =   0  'None
  52.       Height          =   480
  53.       Left            =   255
  54.       Picture         =   ABOUTBOX.FRX:0000
  55.       ScaleHeight     =   480
  56.       ScaleWidth      =   480
  57.       TabIndex        =   4
  58.       Top             =   150
  59.       Width           =   480
  60.    End
  61.    Begin Label Lbl_InfoValues 
  62.       Height          =   600
  63.       Left            =   2910
  64.       TabIndex        =   7
  65.       Top             =   1440
  66.       Width           =   1410
  67.    End
  68.    Begin Label Lbl_Info 
  69.       Height          =   600
  70.       Left            =   1005
  71.       TabIndex        =   6
  72.       Top             =   1440
  73.       Width           =   1875
  74.    End
  75.    Begin Label Lbl_Microsoft 
  76.       Caption         =   "Microsoft Visual Basic for Windows 3.00"
  77.       FontBold        =   -1  'True
  78.       FontItalic      =   0   'False
  79.       FontName        =   "MS Sans Serif"
  80.       FontSize        =   9.75
  81.       FontStrikethru  =   0   'False
  82.       FontUnderline   =   0   'False
  83.       Height          =   240
  84.       Left            =   990
  85.       TabIndex        =   3
  86.       Top             =   1005
  87.       Width           =   4365
  88.    End
  89.    Begin Label Lbl_Version 
  90.       Caption         =   "Version 1.00"
  91.       FontBold        =   -1  'True
  92.       FontItalic      =   0   'False
  93.       FontName        =   "MS Sans Serif"
  94.       FontSize        =   9.75
  95.       FontStrikethru  =   0   'False
  96.       FontUnderline   =   0   'False
  97.       Height          =   240
  98.       Left            =   990
  99.       TabIndex        =   2
  100.       Top             =   735
  101.       Width           =   1470
  102.    End
  103.    Begin Label Lbl_IconWorks 
  104.       Caption         =   "VB JigSaw"
  105.       FontBold        =   -1  'True
  106.       FontItalic      =   0   'False
  107.       FontName        =   "MS Sans Serif"
  108.       FontSize        =   18
  109.       FontStrikethru  =   0   'False
  110.       FontUnderline   =   0   'False
  111.       Height          =   450
  112.       Left            =   990
  113.       TabIndex        =   1
  114.       Top             =   165
  115.       Width           =   1920
  116.    End
  117. DefInt A-Z
  118. Declare Function GetWinFlags Lib "Kernel" () As Long
  119. Declare Function GetFreeSpace Lib "Kernel" (ByVal wFlags) As Long
  120. Const WF_STANDARD = &H10
  121. Const WF_ENHANCED = &H20
  122. Const WF_80x87 = &H400
  123. Sub Cmd_OK_Click ()
  124.     Unload AboutBox
  125. End Sub
  126. Sub Form_Load ()
  127. Dim WinFlags As Long
  128. Dim Mode As String, Processor As String
  129.     ' Dialog Boxes should only have Move and Close items
  130.     ' in their System menus', so remove the others.
  131.     '
  132.     Remove_Items_From_Sysmenu AboutBox
  133.     ' Center the AboutBox on the screen
  134.     '
  135.      Move (Screen.Width - Width) \ 2, (Screen.Height - Height) \ 2
  136.     ' Get current Windows configuration
  137.     '
  138.     WinFlags = GetWinFlags()
  139.     ' Display configuration values in Lbl_Info.Caption and Lbl_InfoValues.Caption
  140.     ' (NOTE: CRLF variable causes a line break in a labels caption)
  141.     '
  142.     If WinFlags And WF_ENHANCED Then Mode = "386 Enhanced Mode" Else Mode = "Standard Mode"
  143.     Lbl_Info.Caption = Mode + Chr$(13) + Chr$(10) + "Free Memory:" + Chr$(13) + Chr$(10) + "Math Co-processor:"
  144.     If WinFlags And WF_80x87 Then Processor = "Present" Else Processor = "None"
  145.     Lbl_InfoValues.Caption = Chr$(13) + Chr$(10) + Format$(GetFreeSpace(0) \ 1024) + " KB" + Chr$(13) + Chr$(10) + Processor
  146. End Sub
  147.